<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <!--    <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Parent_id')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-parent_id" data-rule="required" min="0" data-source="parent/index" class="form-control selectpage" name="row[parent_id]" type="text" value="0">
            </div>
        </div>-->
    <!--    <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Post_count')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-post_count" data-rule="required" min="0" class="form-control" name="row[post_count]" type="number" value="0">
            </div>
        </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Video_category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-video_category_id" data-rule="required" class="form-control selectpicker" name="row[video_category_id]">
                {foreach $categoryList as $v}
                <option value="{$v.id}" >{$v.platename}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <!--专辑id-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('album_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-album_id" data-rule="" class="form-control selectpicker" name="row[album_id]">
                <option value="" >无</option>
                {foreach $albumList as $v}
                <option value="{$v.id}" >{$v.name}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" data-rule="required" class="form-control" name="row[description]" type="text" value="">
        </div>
    </div>

    <div class="form-group" data-field="thumbnail">
        <label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control hidden" size="50" name="row[image]" type="text" value="" placeholder="上传图片">
                <div class="input-group-addon no-border no-padding" style="display: table;">
                    <span>
                        <button type="button"
                                data-url="upload_file/uploadOBS"
                                id="plupload-image"
                                class="btn btn-danger plupload"
                                data-input-id="c-image"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                data-multiple="false"
                                data-preview-id="p-image">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
<!--                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>

<!--            暂时注释-->
<!--            <ul class="row list-inline plupload-preview" data-template="p_image_box" id="p-image"></ul>-->
<!--            &lt;!&ndash;自定义上传预览&ndash;&gt;-->
<!--            <script type="text/html" id="p_image_box">-->
<!--                <li class="col-xs-3">-->
<!--                    <a href="http://video-source.fupanai.com<%=fullurl%>" target="_blank" class="thumbnail">-->
<!--                        <img src="http://video-source.fupanai.com<%=fullurl%>" class="img-responsive">-->
<!--                    </a>-->
<!--                    <a href="javascript:;" class="btn btn-danger btn-xs btn-trash"><i class="fa fa-trash"></i></a>-->
<!--                </li>-->
<!--            </script>-->
        </div>
    </div>

    <div class="form-group" data-field="thumbnail">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" title="视频/音频" fileInput_id='fileInput_video_path' name="row[video_path]" input_value="" url_arr="[]" /}
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Live_time')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-delete_time" data-rule="required" min="0" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[live_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
<!--        </div>-->
<!--    </div>-->
    <!--    <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Seo_title')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-seo_title" data-rule="required" class="form-control" name="row[seo_title]" type="text" value="''">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Seo_keywords')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-seo_keywords" data-rule="required" class="form-control" name="row[seo_keywords]" type="text" value="''">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Seo_description')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-seo_description" data-rule="required" class="form-control" name="row[seo_description]" type="text" value="''">
            </div>
        </div>-->
    <!--    <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Is_del')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-is_del" data-rule="required" min="0" class="form-control" name="row[is_del]" type="number" value="1">
            </div>
        </div>-->

    <!--是否推荐到首页-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('is_recommend')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_recommend]', ['1'=>__('Yes'), '0'=>__('No')],0)}
        </div>
    </div>

    <!--是否在侧边栏展示-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否在侧边栏展示')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_sidebar]', ['1'=>__('Yes'), '0'=>__('No')],1)}
        </div>
    </div>

    <!--    排序数字越大，权重越高，默认为0-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('sort')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control" name="row[sort]" type="number" step="any" min="0" data-rule="required;range(0~)" placeholder="数字越大权重越高" value="0">
        </div>
    </div>

    <!--    会员价格-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_price" class="form-control" name="row[membership_price]" type="number" step="any" min="0" data-rule="required;range(0~)" value="0">
        </div>
    </div>
    <!--    会员时长-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_duration" class="form-control" name="row[membership_duration]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="0">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
